Method and system to execute recovery in non-homogeneous multi processor environments

ABSTRACT

Disclosed are a method and system for parallel execution of recovery in a non-homogeneous multi-processor environment. The method defines criteria how to decide which recovery actions are to be performed, and on which processor. If multiple recovery actions are pending, the goal is to execute them in parallel on multiple processors. This is much more efficient than the traditional approach of one processor doing all the required recovery. In addition, in large, non-homogeneous systems such a single processor capable of doing the complete recovery might not be existing at all due to technical limitations. The method of this invention also defines rules and mechanisms how multiple processors executing recovery in parallel can access shared resources while avoiding deadlock situations. This includes accessing resources that are currently owned by another processor.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is related to copending application Ser. No. 11/223,701, for “Method And System To Detect Errors In Computer Systems By Using State Tracking,” filed herewith; application Ser. No. 11/223,733, for “Method And System For State Tracking And Recovery In MultiProcessing Computing Systems,” filed herewith; and application Ser. No. 11/223,877, for “Method And System To Recover From Control Block Hangs In A Heterogeneous Multiprocessor Environment,” filed herewith. The disclosures of the above-identified applications are herein incorporated by reference in their entireties.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention in general relates to computer systems, and in particular, to multiprocessing computer systems. Even more specifically, the invention relates to methods and systems to execute recovery in non-homogeneous multi processor environments.

2. Background Art

Multiprocessor computer systems are becoming increasingly important in modern computing because combining multiple processors increases processing bandwidth and generally improves throughput, reliability and serviceability. Multiprocessing computing systems perform individual tasks using a plurality of processing elements, which may comprise multiple individual processors linked in a network, or a plurality of software processes or threads operating concurrently in a coordinated environment.

Many early multiprocessor systems were comprised of multiple, individual computer systems, referred to as partitioned systems. More recently, multiprocessor systems have been formed from one or more computer systems that are logically partitioned to behave as multiple independent computer systems. For example, a single system having eight processors might be configured to treat each of the eight processors (or multiple groups of one or more processors) as a separate system for processing purposes. Each of these “virtual” systems would have its own copy of an operating system, and may then be independently assigned tasks, or may operate together as a processing cluster, which provides for both high speed processing and improved reliability.

The International Business Machines Corporation zSeries servers have achieved widespread commercial success in multiprocessing computer systems. These servers provide the performance, scalability, and reliability required in “mission critical environments.” These servers run corporate applications, such as enterprise resource planning (ERP), business intelligence (BI), and high performance e-business infrastructures. Proper operation of these systems can be critical to the operation of an organization and it is therefore of the highest importance that they operate efficiently and as error-free as possible, and rapid problem analysis and recovery from system errors is vital. It may be noted that logical partitioning on an IBM zSeries server means that the physical processors are virtualized. This means that the system can be configured to treat each of the virtual processors (or multiple groups of one or more virtual processors) as a separate system for processing purposes.

A large multiprocessor system, such as the IBM zSeries servers, maintains a large state space in data structures. Usually many of these structures are shared. Each task in the system modifies a (small) portion of the overall state. Such a task possibly can—due to a hardware or a code error—do an erroneous or incomplete modification of the state. This item of the state space may affect a single or multiple components of the system. In any case, an effective recovery actions is required to restore consistency.

The traditional approach is to first collect a system wide overview of the pending recovery actions to be performed. A single processor then executes the recovery, while the other affected ones are kept in a secure state. While this approach is suitable for small and homogeneous systems, it usually cannot be applied to large, non-homogeneous systems. There are two reasons for that:

A single processor would be required that is technically able to perform all recovery actions. However, in large systems, usually not all processors do have the same capabilities. A single processor capable to perform all possible kinds of recovery actions often does not exist.

Overall recovery execution time is a problem in large systems, since all processors affected by the error are unresponsive to outside requests while doing the recovery. Therefore parallel execution of recovery for the affected processors is required in order to keep the recovery execution time at a minimum.

SUMMARY OF THE INVENTION

An object of the present invention is to provide a method for parallel execution of recovery in a non-homogeneous multi-processor environment.

Another object of this invention is to provide a method and system, for use in a recovery process in a non-homogeneous multi-processor environment, that define criteria how to decide which recovery actions are to be performed, and which processor to use for the recovery actions.

A further object of the invention is to provide rules and mechanisms, for use in a recovery process in non-homogeneous multi-processor environments, how multiple processors executing recovery in parallel can access shared resources while avoiding deadlock situations.

These and other objectives are attained with a method and system for parallel execution of recovery in a non-homogeneous multi-processor environment. The method defines criteria how to decide which recovery actions are to be performed, and on which processor. If multiple recovery actions are pending, the goal is to execute them in parallel on multiple processors. This is much more efficient than the traditional approach of one processor doing all the required recovery. In addition, in large, non-homogeneous systems such a single processor capable of doing the complete recovery might not be existing at all due to technical limitations. The method of this invention also defines rules and mechanisms how multiple processors executing recovery in parallel can access shared resources while avoiding deadlock situations. This includes accessing resources that are currently owned by another processor.

Further benefits and advantages of the invention will become apparent from a consideration of the following detailed description, given with reference to the accompanying drawings, which specify and show preferred embodiments of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a multi-processor computing system with which the present invention may be used.

FIG. 2 identifies various strategies that may be used for scheduling recovery actions, in accordance with the present invention, in a non-homogeneous multi-processor environment.

FIG. 3 identifies strategies, in accordance with this invention, for avoiding hangs and delays during recovery actions when resources are shared among processors.

FIG. 4 shows a task control block that may be used in the preferred embodiment of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 illustrates multiprocessor computer system 100 that generally comprises a plurality of host computers 110, 112, 114, which are also called “hosts”. The hosts 110, 112, 114 are interconnected with host links 116, which may comprise, for example, Coupling Links, Internal Coupling Channels, an Integrated Cluster Bus, or other suitable links. Rather than using three hosts 110, 112, 114 as in the illustrated example, in alternative embodiments one, two, four, or more hosts may be used. System 100 also includes a timer 118 and a coupling facility 120.

Each host 110, 112, 114 itself is a multiprocessor system. Each host 110, 112, 114 may be implemented with the same type of digital processing unit (or not). In one specific example, the hosts 110, 112, 114 each comprise an IBM zSeries Parallel Sysplex server, such as a zSeries 900, running one or more of the z Operating System (z/OS). Another example of a suitable digital processing unit is an IBM S/390 server running OS/390. The hosts 110, 112, 114 run one or more application programs that generate data objects, which are stored external from or internal to one or more of the hosts 110, 112, 114. The data objects may comprise new data or updates to old data. The host application programs may include, for example, IMS and DB2. The hosts 110, 112, 114, run software that includes respective I/O routines 115 a, 115 b, 115 c. It may be noted that other types of hosts may be used in system 100. In particular, hosts may comprise any suitable digital processing unit, for example, a mainframe computer, computer workstation, server computer, personal computer, supercomputer, microprocessor, or other suitable machine.

The system 100 also includes a timer 118 that is coupled to each of the hosts 110, 112, 114, to synchronize the timing of the hosts 110, 112, 114. In one example, the timer 118 is an IBM Sysplex®. Timer. Alternatively, a separate timer 118 may be omitted, in which case a timer in one of the hosts 110, 112, 114 is used to synchronize the timing of the hosts 110, 112, 114.

Coupling facility 120 is coupled to each of the hosts 110, 112, 114 by a respective connector 122, 124, 126. The connectors 122, 124, 126, may be, for example, Inter System Coupling (ISC), or Internal Coupling Bus (ICB) connectors. The coupling facility 120 includes a cache storage 128 (“cache”) shared by the hosts 110, 112, 114, and also includes a processor 130. In one specific example, the coupling facility 120 is an IBM z900 model 100 Coupling Facility. Examples of other suitable coupling facilities include IBM model 9674 C04 and C05, and IBM model 9672 R06. Alternatively, the coupling facility 120 maybe included in a server, such as one of the hosts 110, 112, 114.

As an example, some suitable servers for this alternative embodiment include IBM z900 and S/390 servers, which have an internal coupling facility or a logical partition functioning as a coupling facility. Alternatively, the coupling facility 120 may be implemented in any other suitable server. As an example, the processor 130 in the coupling facility 120 may run the z/OS. Alternatively, any suitable shared memory may be used instead of the coupling facility 120. The cache 128 is a host-level cache in that it is accessible by the hosts 110, 112, 114. The cache 128 is under the control of the hosts 110, 112, 114, and may even be included in one of the host machines if desired.

As mentioned above, a large multiprocessor system, such as the IBM zSeries servers, maintains a large state space in data structures. Usually many of these structures are shared. Each task in the system modifies a (small) portion of the overall state. Such a task possibly can—due to a hardware or a code error—do an erroneous or incomplete modification of the state. This item of the state space may affect a single or multiple components of the system. In any case, an effective recovery actions is required to restore consistency.

The traditional approach is to first collect a system wide overview of the pending recovery actions to be performed. A single processor then executes the recovery, while the other affected ones are kept in a secure state. While this approach is suitable for small and homogeneous systems, it usually cannot be applied to large, non-homogeneous systems. There are two reasons for that:

A single processor would be required that is technically able to perform all recovery actions. However, in large systems, usually not all processors do have the same capabilities. A single processor capable to perform all possible kinds of recovery actions often does not exist.

Overall recovery execution time is a problem in large systems, since all processors affected by the error are unresponsive to outside requests while doing the recovery. Therefore parallel execution of recovery for the affected processors is required in order to keep the recovery execution time at a minimum.

The present invention provides a method for parallel execution of recovery in a non-homogeneous multi-processor environment. There are two main aspects to this:

-   -   1. Scheduling of recovery actions: which processor executes         which recovery i. actions?     -   2. Access to shared resources held by other processors

Scheduling of Recovery Actions

In a large system, some processors may not be able to perform a required recovery action due to technical limitations. This may be e.g. because they do not have access to the entire state space, or because they do not have access to a specific piece of hardware. Therefore it may even be required that for an error detected on one processor, other so far not affected processors having the required capabilities need to perform the recovery actions.

Errors that affect a shared resource often cause multiple processors to detect the situation within a small amount of time. It then needs to be decided which of the affected processors needs to perform which of the required recovery actions. One problem with that is that in the past, there was no way of quickly determining which portions of the state space were currently active (in the process of being modified). In case of an error, the entire state space had to be assumed to be inconsistent. As a result, a processor doing recovery had to do time consuming scans for activity in order to restore a consistent state space.

Accessing Shared Resources

In order to perform a recovery action for an error, a processor usually accesses several shared data structures. This provides two problems:

A shared data structure may have been in the process of being changed by a functional task running on a second processor that is also affected by the error. In some situations, this second processor is not able to just release the shared data structure. It now needs to be determined under which circumstances the processor executing the recovery is allowed to access the structure despite it currently being owned by another processor.

The serialization of concurrent accesses in large systems can lead to long overall recovery execution times.

The present invention addresses each of the above-discussed aspects of parallel execution of recovery in a non-homogeneous multi-processor environment.

-   -   1. Scheduling of recovery actions:

The method defines criteria how to decide which recovery actions are to be performed, and on which processor. If multiple recovery actions are pending, the goal is to execute them in parallel on multiple processors. This is much more efficient than the traditional approach of one processor doing all the required recovery. In addition, in large, non-homogeneous systems such a single processor capable of doing the complete recovery might not be existing at all due to technical limitations.

Access to shared resources held by other processors:

The method defines rules and mechanisms how multiple processors executing recovery in parallel can access shared resources while avoiding deadlock situations. This includes accessing resources that are currently owned by another processor.

Each of these aspects of the invention is discussed below in more detail.

Scheduling of Recovery Actions

Recovering from an error can require multiple recovery actions to be executed. In the situation of an error affecting multiple processors this always is the case. For each of the individual actions, it needs to be decided which processor in the system should perform it. With reference to FIG. 2, a recovery action can involve a resource where only one specific processor is technically capable to do the recovery. Such a static assignment obviously uniquely defines which processor has to perform the recovery action. The recovery method triggers the appropriate processors to execute their portion of the recovery. In case there are any dependencies between individual recovery actions, the method also takes care that they get executed in the correct sequence.

If multiple processors technically can execute the recovery action, a dynamic scheduling scheme can be applied. After the appropriate processors have been signaled that a recovery is to be performed, there are two different possible strategies depending the nature of the specific action:

-   -   1. First come, first serve:

The first processor entering recovery executes all pending requests together at the same time. For the other processors that got signaled, nothing is left to do. This scheme is appropriate if multiple requests can be executed together on a single processor without (significantly) increasing the execution time compared to executing a single request.

One at a time:

Every processor that enters recovery executes only one of the pending requests. This leads to multiple processors executing the requests in parallel. After a processor completes a recovery action, it checks if there are more requests pending. If yes, it executes another one. This scheme is appropriate if multiple requests cannot be executed together on a single processor without significantly increasing the execution time compared to executing a single request.

Accessing Shared Resources

Accessing and locking of multiple shared resources can result in deadlock situations or significant delays. This is especially true after an error occurred, and resources were locked before in the functional code path. During the recovery actions, at least these resources need to be accessed, too, but often in a different order than in the functional path. With reference to FIG. 3, avoiding hangs and delays in the recovery method is threefold:

-   -   1. Access only as few as possible shared resources:

A task performed in a large system usually changes only a very limited amount of the overall state space. Using bookkeeping mechanisms allows to maintain the current state of activity for the task within a small data structure (Task Control Block, TCB). At the regular end of the task, all modifications to the state space are in a consistent state and the TCB is empty, i.e. it shows no activity on the state space. At any given time, when a task fails (due to a hardware or a code bug), the TCB shows all items that are in the process of modification. For the recovery this allows to change the strategy from “scan to find what needs to be recovered” to a “look up what was in use” approach. This limits the number of shared resources that need to be accessed during recovery to the absolute minimum.

Introduce an order in which multiple resources of different types can be occupied:

To avoid deadlock already by how the processors do occupy multiple resources, classify the resources into different types and define an order of types. When occupying multiple resources, each processor is allowed to lock at most one resource per type, and has to obey the defined sequence of resource types.

Access shared resources owned by other processors:

Accesses to shared resources that are currently owned by another processor can be done if the other processor is in a secure state where it does not access the resource, and is prepared to later work with the resource although its state has changed. This may be done using any suitable definition of such secure processor states, resource access rules, and any appropriate query mechanisms.

FIG. 4 shows a task control block (TCB) that may be used in the practice of the present invention. More specifically, preferably, each processing unit (PU) of the multiprocessor hosts 110, 112 and 114 is assigned at least one TCB, and the TCB will contain information about:

The data structures being used by a PU while executing a task.

PU task state footprint information.

If an error occurs the PU will store error type, error code, and extended error information in the TCB.

Each task running on the PU is assigned a TCB: For example, on the IBM zSeries servers, the PUs can execute in 2 modes, i390 mode or Millicode mode, thus when the present invention is implemented with such servers, there preferably will be 2 TCBs allocated for each PU. Defining unique TCBs per PU for I390 mode and Millicode mode allows greater interleaving of tasks that can occur when processors switch modes while processing functions by keeping the resources used separated. This structure is shown in FIG. 4.

Key TCB Field Definitions

-   -   1. TCB Code field 202: Unique static hexadecimal value to         identify TCB control block type.     -   2. PU# field 204: Physical PU number owning the TCB.     -   3. Mode field 206: Identifier for Millicode or I390 mode     -   4. Control Block Slot Arrays: Three 16 element arrays that         contain:

Control Block Mask (CBM) Array 212: A bit significant mask of valid flags for the fields in the CBC and CBA arrays.

Control Block Code (CBC) Array 214: Contains Control Block Code of the Control Block that was locked or being locked.

Control Block Address (CBA) Array 216: Contains Control Block Address of the Control Blocks that was lock or being locked.

Task Footprint field 220: Indicator of current task step executing on the PU

Error Code field 222: Unique Error data stored by failing task.

Extended Error Information field 224: Additional data stored by failing task to aid in recovery or problem debug.

While it is apparent that the invention herein disclosed is well calculated to fulfill the objects stated above, it will be appreciated that numerous modifications and embodiments may be devised by those skilled in the art, and it is intended that the appended claims cover all such modifications and embodiments as fall within the true spirit and scope of the present invention. 

1. A method of parallel execution of recovery in a multi-processor system including a plurality of processing units the method comprising the steps of: scheduling recovery actions, including the step of providing criteria to determine which recovery actions are to be performed and on which processing units; providing access to shared resources, including the step of providing rules to determine how multiple processing units executing recovery in parallel can access shared resources; and selecting and using one or more of the processing units, according to said criteria and rules, to perform the scheduled recovery actions; wherein: the scheduling step includes the step of scheduling a set of recovery actions; and the selecting and using step includes the steps of i) selecting a plurality of the processing units, the selected processing units entering the recovery process at different times, and ii) using the first processing unit to enter the recovery process to execute all of said set of recovery actions.
 2. A method according to claim 1, wherein the multiprocessor system further includes a plurality of task control blocks, and the step of providing access to shred resources includes the steps of: identifying in the task control blocks the resources being modified by the processing units; and when one of the processing units fails, looking at the task control blocks to identify the resources being modified by said failing processing unit, to reduce the number of shred resources that need to be accessed during recovery.
 3. A method according to claim 2, wherein for each of the processing units, an associated one of the task control blocks identifies all of the shared resources being modified by the processing unit.
 4. A method of parallel execution of recovery in a multi-processor system including a plurality of processing units the method comprising the steps of: scheduling recovery actions, including the step of providing criteria to determine which recovery actions are to be performed and on which processing units; providing access to shared resources, including the step of providing rules to determine how multiple processing units executing recovery in parallel can access shared resources; and selecting and using one or more of the processing units, according to said criteria and rules, to perform the scheduled recovery actions; identifying an order in which multiple resources of different types can be occupied by the processing units, and wherein each of the processing units are allowed to lock at most one resource per type at a time.
 5. A method of parallel execution of recovery in a multi-processor system including a plurality of processing units the method comprising the steps of: scheduling recovery actions, including the step of providing criteria to determine which recovery actions are to be performed and on which processing units; providing access to shared resources, including the step of providing rules to determine how multiple processing units executing recovery in parallel can access shared resources; and selecting and using one or more of the processing units, according to said criteria and rules, to perform the scheduled recovery actions; wherein: the scheduling step includes the step of scheduling a multitude of recovery actions; and the selecting and using step includes the steps of i) selecting a plurality of the processing units, the selected processing units entering the recovery process at different times, and ii) as each of the selected processing units enters the recovery process, the processing unit executing one of said multitude of said recovery actions.
 6. A method according to claim 5, wherein the selecting and using step includes the further step of, when one of the selected processing units completes one of the recovery actions, said one of the selected processing units executing another one of said multitude of recovery actions. 